package net.sea.setup.ui.wizard.impl.module;

import javax.swing.Icon;
import javax.swing.tree.DefaultMutableTreeNode;

import net.sea.setup.config.ModuleNode;

/**
 * 组件树结点数据类
 * @author li_zhen
 *
 */
public class CheckNode extends DefaultMutableTreeNode {

	private static final long serialVersionUID = -6064450224087067021L;
	
	private int selectionMode = 0;
	private boolean isSelected = false;
	private Icon icon = null;
	
	private String id;//组件ID
	private String moduleName;//组件名称
	private ModuleNode moduleNode;//组件
	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getModuleName() {
		return moduleName;
	}

	public void setModuleName(String moduleName) {
		this.moduleName = moduleName;
	}

	public String getModuleParent() {
		return moduleParent;
	}

	public void setModuleParent(String moduleParent) {
		this.moduleParent = moduleParent;
	}

	private String moduleParent;//父组件ID
	
	public ModuleNode getModuleNode() {
		return moduleNode;
	}

	public void setModuleNode(ModuleNode moduleNode) {
		this.moduleNode = moduleNode;
	}

	public CheckNode() {
		this(null);
	}
	
	public CheckNode(Object userObject) {
		this(userObject, true, false);
	}

	public CheckNode(Object userObject, boolean allowsChildren,
			boolean isSelected) {
		super(userObject, allowsChildren);
		this.isSelected = isSelected;
	}

	public int getSelectionMode() {
		return selectionMode;
	}

	public void setSelected(boolean isSelected) {
		this.isSelected = isSelected;
	}

	public boolean isSelected() {
		return isSelected;
	}
	
	public void setIcon(Icon icon){
		this.icon = icon;
	}
	
	public Icon getIcon(){
		return icon;
	}
}
